/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.testis.utils.tree;

import org.testis.orm.testbed.refined.TestBedItem;
import javax.swing.tree.DefaultMutableTreeNode;

/**
 *
 * @author selcuk
 */
public class TbedMutableTreeNode extends DefaultMutableTreeNode {

    public TbedMutableTreeNode() {
        super();
    }

    public TbedMutableTreeNode(Object userObject) {
        super(userObject);
    }

    public String getTypeName() {
        Object obj = getUserObject();
        if (obj instanceof TestBedItem) {
            return ((TestBedItem) obj).getTypeName();
        } else {
            return obj.getClass().getSimpleName();
        }
    }
}
